




/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：02/16/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/ 
package com.application.systemmanager.service;

import java.util.List;
import java.util.Map;

import com.application.systemmanager.dao.SystemManagerDAO;
import com.application.systemmanager.entity.AllowancePut;
import com.application.systemmanager.entity.Notice;
import com.application.systemmanager.entity.ProcessView;
import com.application.systemmanager.entity.SystemConfig;
import com.application.systemmanager.entity.SystemHelp;
import com.application.systemmanager.struts.form.AllowanceForm;
import com.application.systemmanager.struts.form.NoticeForm;
import com.application.systemmanager.struts.form.ProcessForm;
import com.application.systemmanager.struts.form.SystemConfigForm;
import com.application.systemmanager.struts.form.SystemHelpForm;
import com.manager.BaseService;
import com.manager.commons.page.PageBean;

/**
 * Copyrights 1997-2008 西安协同时光软件有限公司<br />
 * Description:NoticeService<br />
 * Version:V0.1<br />
 * Author: Code Generator <br />
 * History: <br />
 * 03/08/2010 SyncBase Code Generator initial version.
 */
public class SystemManagerService extends BaseService {
	private SystemManagerDAO systemManagerDAO;

	public SystemManagerDAO getSystemManagerDAO() {
		return systemManagerDAO;
	}

	public void setSystemManagerDAO(SystemManagerDAO systemManagerDAO) {
		this.systemManagerDAO = systemManagerDAO;
	}

	public Notice getNotice(Notice notice) {
		return (Notice) this.getBaseDao().queryByPk(notice, notice.getId());
	}

	public SystemHelp getHlep(SystemHelp systemHelp) {
		return (SystemHelp) this.getBaseDao().queryByPk(systemHelp, systemHelp.getId());
	}


	public SystemHelp getSystemHelp(SystemHelp systemHelp) {
		return (SystemHelp) this.getBaseDao().queryByPk(systemHelp, systemHelp.getId());
	}
	

	public Integer getAllCountNotice(NoticeForm noticeForm) {
		return this.systemManagerDAO.getAllCountNotice(noticeForm);
	}
	public Integer getAllCountHelp(SystemHelpForm helpForm) {
		return this.systemManagerDAO.getAllCountHelp(helpForm);
	}
	public Integer getAllCountAllowance(AllowanceForm allowanceForm) {
		return this.systemManagerDAO.getAllCountAllowance(allowanceForm);
	}

	public void deleteNotices(NoticeForm noticeForm) {
		this.systemManagerDAO.deleteNotices(noticeForm);
	}
	public void deleteSystemHelp(SystemHelpForm systemHelpForm) {
		this.systemManagerDAO.deleteSystemHelp(systemHelpForm);
	}
	
	public List<Notice> searchNotice(NoticeForm noticeForm, PageBean pageBean) throws Exception {
		List<Notice> noticeList = (List) this.systemManagerDAO.searchNotice(noticeForm, pageBean);
		return noticeList;
	}
	public List<SystemHelp> searchHelp(SystemHelpForm helpForm, PageBean pageBean) throws Exception {
		List<SystemHelp> HelpList = (List) this.systemManagerDAO.searcHelp(helpForm, pageBean);
		return HelpList;
	}
	public AllowanceForm getAllowance(String id) {
		return this.systemManagerDAO.getAllowance(id);
	}

	public List<AllowancePut> searchAllowance(AllowanceForm allowanceForm) throws Exception {
		List<AllowancePut> allowance = (List) this.systemManagerDAO.searchAllowance(allowanceForm);
		return allowance;
	}
	public List searchPlanReportWarningList(){
		return systemManagerDAO.searchPlanReportWarningList();
	}
	/**
	 * 工作台中的通知公告列表
	 * 
	 * @return
	 */
	public List findWorkBenchNoticeList() {
		return systemManagerDAO.findWorkBenchNoticeList();
	}


	
	public Map searchSystemConfig(){
		 return systemManagerDAO.searchSystemConfig();
	}
	
	/**
	 * 
	* TODO 根据配置CODE 得到配置信息
	*  
	* @param code
	* @return
	 */
	public SystemConfig findSystemConfigByCode(String code){
		return systemManagerDAO.findSystemConfigByCode(code);
	}
    
	public void deleteEarlyWaring(String bussinessID,String type,String year,String month,String quarter){
		systemManagerDAO.deleteEarlyWaring(bussinessID,type,year,month,quarter);
	}
	/**
	 * 
	* TODO 根据配置CODE 得到配置信息
	*  
	* @param code
	* @return
	 */
	public boolean checkUserPassword(String username,String password){
		return systemManagerDAO.checkUserPassword(username,password);
	}
	/**
	 * 
	* TODO 根据配置CODE 得到配置信息
	*  
	* @param code
	* @return
	 */
	public void updateUserPassword(String username,String password){
		 systemManagerDAO.updateUserPassword(username,password);
	}
	
	public List findProcessList(ProcessForm processForm,PageBean pageBean){
		return systemManagerDAO.findProcessList(processForm,pageBean);
	}
	
	public Integer findProcessCount(ProcessForm processForm){
		return systemManagerDAO.findProcessCount(processForm);
	}
	
}
